import { Module, NestModule, MiddlewareConsumer } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { CatService } from './cat.service';
import { HotelModule } from './hotel/hotel.module';
import { OtherService } from './other/other.service';
import { OtherModule } from './other/other.module';
import { LogMiddleware } from './log.middleware';
@Module({
  imports: [HotelModule, OtherModule],
  controllers: [AppController],
  providers: [AppService, CatService, OtherService],
})
export class AppModule implements NestModule {
  configure(consumer: MiddlewareConsumer) {
    consumer.apply(LogMiddleware).forRoutes('*');
  }
}
